#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
//	system("start https://www.lanqiao.cn/problems/3909/learning/");

    int n;
    cin >> n;

    vector<string> s(n);

    for(auto & i : s)	cin >> i;

    string t;
    cin >> t;

    int cnt = 0;
    for(auto i : s) {
        if(i.find(t) == 0)
            cnt++;
    }
    cout << cnt;

    return 0;
}

